summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/os/event.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/os/event.cpp')
-rw-r--r--src/core/hle/service/os/event.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/core/hle/service/os/event.cpp b/src/core/hle/service/os/event.cpp
new file mode 100644
index 000000000..ec52c17fd
--- /dev/null
+++ b/src/core/hle/service/os/event.cpp
@@ -0,0 +1,31 @@
+// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "core/hle/kernel/k_event.h"
+#include "core/hle/service/kernel_helpers.h"
+#include "core/hle/service/os/event.h"
+
+namespace Service {
+
+Event::Event(KernelHelpers::ServiceContext& ctx) {
+ m_event = ctx.CreateEvent("Event");
+}
+
+Event::~Event() {
+ m_event->GetReadableEvent().Close();
+ m_event->Close();
+}
+
+void Event::Signal() {
+ m_event->Signal();
+}
+
+void Event::Clear() {
+ m_event->Clear();
+}
+
+Kernel::KReadableEvent* Event::GetHandle() {
+ return &m_event->GetReadableEvent();
+}
+
+} // namespace Service